var fs = require('fs'),
  path = require('path')
var readFile = () => {
  fs.readFile(
    path.join(
      __dirname,
      '/mockServer/api/portal/controller/std/menu/assigned.js'
    ),
    'utf8',
    function(err, data) {
      if (err) throw err
      fs.writeFile('public/tempMenu.js', data, 'utf8', err => {
        if (err) throw err
        console.log('done')
      })
    }
  )
}
readFile()
